<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" href="../../css/main.css" />
    <script src="../../script/vue.min.js"></script>
    <style>
    </style>
</head>

<body>
    <div v-cloak id="menuFour">
        <section style="background: #fff">
          <div class="hot-title">
              <img src="../../image/hot/sdln_hotico.png">
          </div>
          <div class="list-box" v-for="(item, index) in dataList" :key="index" @click="getMoney(item)">
              <div class="list-box-top">
                  <div class="list-box-top-left">
                      <img :src="item.logo">
                      <div class="list-box-top-left-text">
                          <p>{{item.name}}</p>
                          <ul>
                              <li v-for="(items, indexp) in item.detail.feature.split('，')" :key="index">{{items}}</li>
                          </ul>
                      </div>
                  </div>
                  <div class="list-box-top-right" >点我拿钱</div>
              </div>
              <div class="list-box-bottom">
                  <ul>
                      <li class="list-one">
                          <span>额度(元)</span>
                          <p>{{item.detail.limit}}</p>
                      </li>
                      <li class="list-two">
                          <span>成功率</span>
                          <p>{{item.detail.successRate}}</p>
                      </li>
                      <li class="list-two">
                          <span>日费率</span>
                          <p>{{item.detail.rate}}</p>
                      </li>
                  </ul>
              </div>
          </div>
        </section>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script src="../../script/jquery.min.js"></script>
<script type="text/javascript">
apiready = function() {
    var vm = new Vue({
        el: '#menuFour',
        data: {
            dataList: []
        },
        methods: {
            wait: function() {
                api.setRefreshHeaderInfo({
                    visible: true,
                    // loadingImg: '../image/timg.gif',
                    bgColor: '#fafafa',
                    textColor: '#323232',
                    textDown: '下拉刷新...',
                    textUp: '松开立即刷新...',
                    showTime: true
                }, function(ret, err) {
                    setTimeout('api.refreshHeaderLoadDone()', '500');
                })
            },
            getMoney: function(item) {
                $api.isDownload(item, '下载必备')
            },
            getData: function () {
              var that = this
              $.ajax({
             			type: "POST",
                  url: "http://res.txingdai.com/appinfo/?ts=1531811436150&start=0&limit=100",
             			dataType: 'json',
             			async:false,
             			data:{
                    moudleId:'login_xiakuanbibei_shenzhen',
                    boundleId: 'com.tengxin.youqianji',
                    version: '1.0',
                    channel: 'xiaomi'
                  },
             			success: function(data){
                    that.dataList = data.data.list;
             			}
          		});
            }
        },
        created: function() {
            this.wait()
        },
        mounted: function() {
          this.getData()
        }
    })
};
</script>

</html>
